<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="../lib/OSL/layui/css/layui.css">
    <link rel="stylesheet" href="../lib/css/page/lab_appointment_manage.css">
</head>

<body>
    <div class="layui-card">
        <div class="layui-card-header">
            <span>宿舍电量信息</span>
        </div>
        <!-- 卡片区域  -->
        <div class="layui-card-body">
            <!-- //数据区 -->
            <table class="layui-table">
                <colgroup>
                    <col />
                    <col />
                    <col />
                    <col />
                </colgroup>
                <thead>
                    <tr>
                        <th>宿舍名称</th>
                        <th>所属楼栋</th>
                        <th>电量（度）</th>
                        <th>电量状态</th>
                    </tr>
                </thead>
                <tbody>

                </tbody>
            </table>
            <!-- //分页区域 -->
            <div id="pageBox"></div>
        </div>
    </div>
    <!-- ---------------------------------------------------------------- -->
    <!-- 获取列表 -->
    <script type="text/html" id="tpl_lab_list">
        {{each data}}
        <tr>
            <td>{{$value.lab_class_name}}</td>
            <td>{{$value.lab_address}}</td>
            <td>{{$value.electric}}</td>
            {{if $value.electric !==0}}
            <td style="text-align:center !important">
                <button type="button" class="layui-btn layui-btn-xs" disabled="true"
                    style="cursor:default;background-color: #277be2;">正常</button>
            </td>
            {{else}}
            <td style="text-align:center !important">
                <button type="button" class="layui-btn layui-btn-warm layui-btn-xs" disabled="true"
                    style="cursor:default;background-color: #ff0d35;">欠费停电</button>
            </td>
            {{/if}}
        </tr>
        {{/each}}
    </script>
    <!-- ---------------------------------------------------------------- -->
    <script src="../lib/OSL/jquery.js"></script>
    <script src="../lib/OSL/layui/layui.all.js"></script>
    <script src="../lib/js/baseAPI.js"></script>
    <script src="../lib/OSL/template-web.js"></script>
    <script src="../lib/js/page/lab_appointment_electric_my.js"></script>

</body>

</html>